import {chartFrameType, EnumChartType} from "@/pages/dv/constants/EnumDv";
/**
 * html框架组件
 */
const frameType = chartFrameType.html.type;

const chartRoutes: DV.IEnumChartRoute =  {
  [EnumChartType.html_init]: {
    label: 'HTML模板',
    type: EnumChartType.html_init,
    frameType,
    component: () => import(/*webpackChunkName: `lz-chart_html` */'./Html'),
    panelComponent: () => import(/*webpackChunkName: `lz-panel_html` */'../../chartPanels/panel_html/CommonPanel')
  },
  [EnumChartType.html_iframe]: {
    label: 'iframe',
    type: EnumChartType.html_iframe,
    frameType,
    component: () => import(/*webpackChunkName: `lz-chart-iframe` */'./IFrame'),
    panelComponent: () => import(/*webpackChunkName: `lz-panel-iframe` */'../../chartPanels/panel_html/IFrame'),
    configTemp: require('./IFrame').configTemp,
    defaultConfig: {
      mask: true
    }
  },
  [EnumChartType.html_text]: {
    label: '文本',
    type: EnumChartType.html_text,
    frameType,
    component: () => import(/*webpackChunkName: `lz-chart-text` */'./Text'),
    panelComponent: () => import(/*webpackChunkName: `lz-panel-text` */'../../chartPanels/panel_html/Text'),
    configTemp: require('./Text').configTemp
  },
  [EnumChartType.html_link]: {
    label: '超链接',
    type: EnumChartType.html_link,
    frameType,
    component: () => import(/*webpackChunkName: `lz-chart-link` */'./Link'),
    panelComponent: () => import(/*webpackChunkName: `lz-panel-iframe` */'../../chartPanels/panel_html/Link'),
    configTemp: require('./Link').configTemp
  }
}

export default chartRoutes;
